package info.thereisonlywe.onenesspathfinder.configuration;

import info.thereisonlywe.core.constants.language.GlobalLanguageConstants;
import info.thereisonlywe.core.project.ProjectConstants;
import info.thereisonlywe.core.project.ProjectSettings;

import java.util.Locale;

public class Main {

	protected static StartupSettings startupSettings = null;

	public static void main(String[] args)
	{
		if (StartupSettings.STARTUP_SETTINGS_FILE.exists())
		{
			startupSettings = new StartupSettings(true);
			System.out.println(Main.startupSettings.getString("language"));

		}
		else
		{
			startupSettings = new StartupSettings(false);
			startupSettings.set("language", "English");
		}

		ProjectSettings.setLocale(new Locale(GlobalLanguageConstants
				.getLanguageCode(startupSettings.getString("language"))));
		ProjectSettings
				.setPackagesForLocalization(new String[] { ProjectConstants.CORE_PROJECT });
		ConfigurationDialog.showDialog();
	}

}
